import request from '@/utils/request'

// 获取储值余额明细
export function listBalance(query) {
  return request({
    url: '/balance/detail/list',
    method: 'get',
    params: query
  })
}

// 获取用户储值余额
export function getBalance(userId) {
  return request({
    url: '/balance/detail/info/' + userId,
    method: 'get'
  })
}

// 储值充值
export function rechargeBalance(data) {
  return request({
    url: '/balance/detail/recharge',
    method: 'post',
    data: data
  })
}

// 储值消费
export function consumeBalance(data) {
  return request({
    url: '/balance/detail/consume',
    method: 'post',
    data: data
  })
}
